package sketch.issta11;

import sketch.experiment.complexdatastructure.AllComplexDataStructures;
import sketch.experiment.sketchguidedrandom.SketchGuidedJapaTest;
import sketch.experiment.sketchguidedrandom.SketchGuidedSAT4JTest;
import sketch.experiment.sketchguidedrandom.SketchGuidedTinySqlTest;
import sketch.issta11.apachecommons.ApacheCommonsCollectionsTest;
import sketch.issta11.jodatime.JodaTimeTest;
import sketch.issta11.specifyoracles.SpecifyOraclesTestAll;
import sketch.issta11.specifystatements.SpecifyStatementsTestAll;
import sketch.issta11.specifyvalues.SpecifyValuesTestAll;
import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;

/**
 * Execute this unit tests, and you will reproduce all experiment results as
 * described in the ISSTA'11 submission paper.
 * 
 * Note, you need to configure your environment probably, particularly for the
 * classpath and dependent files, several important points:
 * 
 * 1. suggest to import the whole project from google code into eclipse as a project
 * 2. add ./output (which is a tmp file dir) into your classpath in eclipse
 * 3. make sure that the re-rewritten ApacheCommonsCollectionTest and JodaTimeTest
 *    test suites are put in the correct places, see this two test files
 * 4. programs in the sketch-guided random test generation require inputs, e.g.
 *    the database file of tinysql, the constraint file for sat4j, and a sample
 *    java file for JavaParser. you need to make sure these files are placed
 *    in the correct place. (if you run this test in eclipse environment,by default,
 *    all the above files should be already in their correct places).
 * */
public class RunAllISSTA11Examples extends TestCase {

	public static Test suite() {
		TestSuite suite = new TestSuite();
		
		//simple examples described in the paper
		suite.addTest(SpecifyOraclesTestAll.suite());
		suite.addTest(SpecifyStatementsTestAll.suite());
		suite.addTest(SpecifyValuesTestAll.suite());
		
		//two large subjects with rewritten test cases
		//takes a long time, and needs complex environment configuration
//		suite.addTest(ApacheCommonsCollectionsTest.suite());
//		suite.addTest(JodaTimeTest.suite());
		
		//sketching four complex data structures
		suite.addTest(AllComplexDataStructures.suite());
		
		//sketching-guided random test generation
		suite.addTest(SketchGuidedJapaTest.suite());
		suite.addTest(SketchGuidedSAT4JTest.suite());
		suite.addTest(SketchGuidedTinySqlTest.suite());
		
		return suite;
	}
	
}